package cn.edu.scau.cmi.linjinyong.simpleFactoryMethod;

import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.Label;

public class Controller {

    @FXML
    private Label resultLabel;

    @FXML
    private Button chickenButton;
    @FXML
    private Button porkButton;
    @FXML
    private Button beefButton;


    @FXML
    private void initialize() {
    }

    @FXML
    private void chooseChicken() {
        resultLabel.setText("选择结果："+MeatFactory.getMeat("Chicken").cook());
    }

    @FXML
    private void choosePork() {
        resultLabel.setText("选择结果："+MeatFactory.getMeat("Pork").cook());
    }

    @FXML
    private void chooseBeef() {
        resultLabel.setText("选择结果："+MeatFactory.getMeat("Beef").cook());
    }
}
